import request from '../utils/request';

/**
 * 查询我学习的课程--分页
 */
export const selectMyJoinedCourse = (data) => {
  return request.post(`/project/user/selectMyJoinedCourse`, { data });
};

/**
 * 删除我学习的课程
 */
export const deleteMyJoinedCourse = (params) => {
  return request.post(`/project/user/deleteMyJoinedCourse`, { params });
};

/**
 * 加入学习--加入课程以及加入专题下的课程都是这个
 */
export const joinCourse = (data) => {
  return request.post(`/project/user/joinCourse`, { data });
};

/**
 * 更新我学习的课程进度或者状态
 */
export const updateMyJoinedCourse = (data) => {
  return request.post(`/project/user/updateMyJoinedCourse`, { data });
};

/**
 * 查询当前用户的收藏课程列表--分页
 */
export const loadMyFavList = (params) => {
  return request.get(`/project/fav/loadMyFavList`, { params });
};

/**
 * 累计时长 统计
 */
export const selectMyTimeReport = (params) => {
  return request.get(`/project/user/selectMyTimeReport`, { params });
};
